package work.xiaohong.saolei.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

import static io.swagger.v3.oas.annotations.media.Schema.AccessMode.READ_ONLY;

@Schema(name = "SaoleiVersions")
@Data
public class Versions implements Serializable{

    @TableId(value = "id",type = IdType.ASSIGN_ID)
    @Schema(description = "主键ID",accessMode = READ_ONLY,required = true)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
	private Long id;//主键ID

    @Schema(description = "版本号",required = true)
    @TableField("versionCode")
	private String versionCode;//版本号

    @Schema(description = "软件名",required = true)
    @TableField("name")
	private String name;//软件名

    @Schema(description = "更新信息描述",required = true)
    @TableField("description")
	private String description;//更新信息描述

    @Schema(description = "新版本下载地址",required = true)
    @TableField("updateUrl")
	private String updateUrl;//新版本下载地址

    @Schema(description = "创建时间",accessMode = READ_ONLY)
    @TableField(value = "gmt_create",fill = FieldFill.INSERT)
	private LocalDateTime gmtCreate;//创建时间

    @Schema(description = "更改时间",accessMode = READ_ONLY)
    @TableField(value = "gmt_modified",fill = FieldFill.INSERT_UPDATE)
	private LocalDateTime gmtModified;//更改时间

    @Schema(description = "乐观锁",accessMode = READ_ONLY)
    @Version
	private Integer version;//乐观锁

    @Schema(description = "逻辑删除标志",accessMode = READ_ONLY)
    @TableLogic
	private Integer deleted;//逻辑删除标志


}
